package com.itheima.domain.mongo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "sound")
public class Sound implements Serializable {

    private ObjectId id;  //主键id
    private Long sid;     //传音使用的id
    private Long created; //创建时间
    private Long userId; // 传音用户id
    private String gender;//枚举性别
    private Integer age;//声音的年龄
    private String soundUrl;//声音地址

    public enum Gender {//为了判断是 桃花传音而不是菊花传音,所以将性别设定在了sound中
        man,woman
    }


}
